/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




@import "colors";
@import "standards";
@import "font-awesome";


#profile-info {
    margin-top: 0;
    @include border-radius(0px 0px 3px 3px);
    border-top: none;
}

.profile-picture-row {
    width: 35%;
    @include border-radius(0 0px 3px 3px !important)
}

#profile-info-container .edit.right {
    color: inherit;
    margin-right: 7px;
    margin-top: 2px;
    margin-bottom: -3px;
    opacity: 0.7;
}

#profile-info-minimize-button, #profile-info-maximize-button {
    margin-right: 5px;
    width: 14px;
    color: inherit;
}

#profile-settings-button {
    margin-top: 8px;
    margin-right: 8px;
}

#profile-widgets-container {
    /*float: right !important;*/
}

#profile-widgets-container .x2grid-header-container table, #profile-widgets-container-2 .x2grid-header-container table {
    border: none;
}

#profile-widgets-container table, #profile-widgets-container-2 table {
    margin: 0;
}

#content .x2-layout-island {
    border: none;
}

#profile-info-container, #activity-feed-container, .sortable-widget-container {
    // border: 1px solid #c5c5c5 !important;
}

#profile-info-container {
    @include border-radius(4px);
}

#profile-info {
    border: none !important;
}

#profile-right-content, #profile-left-content {
    box-sizing: border-box;
    display: inline-block;
    width: 40%;
}

#content {
    background: none !important;
    border: none !important;
    margin: 0px;
}

#content .page-title {
    @include border-radius(2px 2px 0px 0px);
    padding: 6px 12px 2px 12px;
}

.profile-sort-placeholder {
    height: 200px;
}

#profile-info-container .page-title, #activity-feed-container .page-title {
    line-height: 29px;
    height: 30px;
}

#profile-info-container .page-title > h2, #activity-feed-container .page-title > h2 {
    font-size: 17px;
}

#profile-info-container .page-title > h2 {
    background-position: -1px -8px;
}

#profile-image-container {
    margin: auto;
}

.file-wrapper.full-profile-info {
    height: 211px;
}

.file-wrapper {
    height: 119px;
    display: block;
}


#create-profile-widget-dialog #chart-name-container {
    select {
        margin-right: 5px;
        margin-left: 5px;
    }
}



/***********************************************************************
* profile layout responsive css is duplicated 3 times. Once so that two
* column profile can be used in browsers which don't support media
* queries and two more times so that the layout responds correctly
* both when the right widgets are shown and when they are hidden.
***********************************************************************/

@mixin profile-content(){
    #profile-info-container-outer {
        float: left;
        width: 52%;
    }
    #profile-widgets-container-2 {
        // padding-bottom: 20px;
        // margin-bottom: -20px;
        /* prevent padding from taking up space in layout  */
        &.empty-widget-container {
            padding-bottom: 30px;
        }
    }
    #profile-widgets-container-inner {
        padding-bottom: 200px;
        margin-bottom: -200px;
        /* prevent padding from taking up space in layout  */
        &.empty-widget-container {
            height: 100%;
            position: fixed;
            width: 33%;
        }
    }
    #profile-widgets-container-2 {
        width: 52%;
        clear: left;
        float: left;
        margin-left: 0;
        margin-right: 0;
    }
    #activity-feed-container-outer {
        width: 52%;
        clear: left;
        float: left;
        margin-left: 0;
        margin-right: 0;
   
    }
    #activity-feed-container {
        margin-left: 0px;
    }
    #profile-widgets-container {
        float: right;
        width: 48%;
   
    }
    #profile-widgets-container-inner {
        margin-bottom: 20px;
    }
}

@mixin profile-content-compact(){
    #profile-content-container.full-profile {
        #profile-widgets-container,
        #profile-widgets-container-2,
        #activity-feed-container-outer {
            float: left;
            width: 100% !important;
        }
        #profile-widgets-container-inner {
            margin-left: 0;
        }
    }
    #profile-layout-editor .screen-too-small {
        display: inline-block !important;
    }
}


@media (max-width: 657px) {
    #activity-feed-container .responsive-page-title > .mobile-dropdown-button, #profile-info-container .responsive-page-title > .mobile-dropdown-button {
        margin-top: -22px;
        margin-right: 7px;
    }
}

/* right widgets shown */
/*@media (min-width: 1544px) {*/
@media (max-width: 1344px) {
    body.show-widgets {
        @include profile-content-compact();
    }
}

@media (max-width: 1032px) {
    body.no-widgets {
        @include profile-content-compact();
    }
}


// Full width 
@media (min-width: 1344px) {
    #profile-content-container.full-profile {
        @include profile-content();
   }
}

//Right Widgets hidden
@media (min-width: 1032px) {
    .no-widgets #profile-content-container.full-profile {
        @include profile-content();
    }
}

// Browsers without media Queries
#profile-content-container.full-profile {
    @include profile-content();
}
